﻿namespace DesignPattern.com.bridge.gameDemo {
    public abstract class ICharacter {
        private IWeapon _weapon;

        protected void weaponAttackTarget(ICharacter target){
            _weapon.attack(target);
        }
        
        public abstract void attack(ICharacter target);
        public abstract void underAttack(ICharacter attacker);
        
        
        public IWeapon Weapon {
            get { return _weapon; }
            set {
                if (value != null){
                    
                }
                
                _weapon = value;
                _weapon.Owner = this; 
            }
        }
    }
}